home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr11
/
pdox693.zip
/
TI547.ASC
< prev
next >
Wrap
Text File
|
1992-08-12
|
5KB
|
133 lines
PRODUCT : PARADOX NUMBER : 547
VERSION : 3.0
OS : DOS
DATE : August 12, 1992 PAGE : 1/2
TITLE : PAL MEMORY CONSERVATION TIPS
Memory Conservation Checklist
=============================
[] Variables - Make variables private to each proc, or RELEASE
them individually as soon as possible.
- A newly assigned variable will open a 2K block
of memory. When additional variables are
assigned, they are added to the block until the
block is full, and then a new block is opened.
Any 2K block is not returned to the memory pool
until every variable in the block is released.
So, it is possible to randomly release variables
and never empty a complete block, thereby never
affecting the overall memleft.
[] Procedures - Keep them under 12K, preferably under 4K. Small
procs allow more efficient swapping.
[] Libraries - Each library has its own directory listing that
will be loaded into RAM when a proc is called.
Usually a 2K block is reserved for this
directory listing, but the block could be as
large as 12K or more if the library was created
with the size option greater than the default of
50. Potential trouble is that this block must
be a contiguous block. You may need SETSWAP
greater than 50000 to find a contiguous 12K
block of memory. It is easier to keep the
libraries small.
[] Autolib - This is the preferred management tool in
versions 2.0 or higher. The READLIB and RELEASE
PROCS are largely outdated now, except for in
special cases such as reading in an error
procedure, which cannot be found from AUTOLIB.
[] Setswap - SETSWAP goes hand in hand with AUTOLIB.
- SETSWAP fixes the minimum value of MEMLEFT()
before procedure swapping starts.
PRODUCT : PARADOX NUMBER : 547
VERSION : 3.0
OS : DOS
DATE : August 12, 1992 PAGE : 2/2
TITLE : PAL MEMORY CONSERVATION TIPS
- SETSWAP can be dynamically allocated by you, the
PAL programmer, to achieve the best mix of
performance and MEMLEFT(). A higher SETSWAP
will result in more frequent swapping and
somewhat slower performance. At the same time,
it will make more room (memory) to add an
additional table to the workspace or to execute
a query. SETSWAP at 50000 will try to reserve
50K table processing. You can raise and lower
SETSWAP in an application as needed.
[] Swapability - Things that can swap:
- Myprocname() ; A proc by itself on a line
- X = Myprocname() ; Similar to the above
- Things that can inhibit swapping:
- EXECUTE "anyproc()"+variable+""
- escape = NOT Myproc()
- Any procs that are defined in-line in a script
but are not in a library
- Potential problem:
- proc anyproc() ; A script may not be able
PLAY "ScriptA" ; to return to a proc if
endproc ; the proc was swapped out
; Avoid scripts inside of
; procedures
- Samples that will swap:
- Myproc() ; A proc on a line by itself
- variable1 = myproc()
variable2 = NOT variable1
DISCLAIMER: You have the right to use this technical information
subject to the terms of the No-Nonsense License Statement that
you received with the Borland product to which this information
pertains.